Chris Pollett > Old Classses >
CS116a

( Print View )

Student Corner:
  [Grades Sec1]
  [Submit Sec1]
  [Class Sign Up Sec1]
  [
Lecture Notes]
  [Discussion Board]

Course Info:
  [Texts & Links]
  [Topics/Outcomes]
  [Outcomes Matrix]
  [Grading]
  [Class Protocols]
  [HW/Quiz Info]
  [Exam Info]
  [Regrades]
  [Honesty]
  [Additional Policies]
  [Announcements]

HW Assignments:
  [Hw1]  [Hw2]  [Hw3]
  [Hw4]  [Hw5]  [Quizzes]

Practice Exams:
  [Midterm]  [Final]

                           












HW#3 --- last modified February 07 2019 04:34:11..

Solution set.

Due date: Oct 30

Files to be submitted:
  Hw3.zip

Purpose: To get ready for Halloween by experimenting with Blender and quaternions.

Related Course Outcomes:

The main course outcomes covered by this assignment are:

LO2 -- Create simple 2D or 3D scenes in OpenGL.

LO5 -- Write an OpenGL program that makes used of 2D or 3D affine transformations.

Specification:

For the first part of the homework I want you to experiment with the Blender 3D modeling by attempting to make a model of you in what you will be wearing for Halloween. We will go over Blender on Oct. 9 at a pretty basic level, so just take your best stab at this and have fun. If your .blend file is too big put it in DropBox or some similar site make it accessible to the grader and put a link in a README.txt file your homework zip file.

For the second part of the homework, I want you to take your robot from the last homework and make re-color him/modify him so that he looks more like Frankenstein's Monster. Your monster should initially appear at the origin in world coordinates, facing towards the x-axis. The camera should be at +10 units from the origin in the z-direction, +3units in the y-direction looking at the origin. Your monster should be 5 units tall and rest on a green ground covering the visible x-z plane. There should be a white shell of a cylinder 0.5 high, 0.25 units thick embedded evenly through the x-z plane of radius 10 units. Your monsters arms should be outstretched in front. When the `a` (for animate) key is pressed over the course of the next 20 seconds your monster should walk 5 paces down the x-axis, turn 180 degrees in the negative z-direction and walk 10 paces in the opposite direction, turn another 180 degrees and walk back to where he started. You can use glutTimerFunc to set a callback for animation. The translation and rotation motions should be drawn at various frame rates, by default the motion should be at 32 frames/second. Hitting the `1` keys returns one to the default. Hitting the numbers between `2`-`9` halves the frame rate of the previous number. So after hitting 2 one would see things at 16 frames/sec. When your monster should walks he alternates left up right leg down every second in a smooth motion (smooth when at 32 frames/second). He walks in a stiff-legged manner. The total angle of motion should be more of a intermediate shuffle than a goose-step. Your code should handle any rotations between the endpoint angles described previously using interpolation via quaternions. You should download the book's quaternion library and add it to your project. You should implement the TODO methods in rigtform.h. You should make nontrivial use of this code and quat.h. By default, interpolation should be quaternionic powering. Pressing `p` should return one to this default, pressing `s` should cause slerping to be used, and pressing `l` should cause lerping to be used. Hitting the `-` key should move the viewpoint outwards 1unit in the z-direction to a maximum distance of 20 (not in one press), hitting `=` in a similar fashion should move you inwards 1 unit in the z-direction to a minimum distance of 5. i.e., hitting = twice would move you two units inward. These actions should also change the radius of the cylinder. Hitting ',' and '.' should tilt the cylinder about the z-axis by `pi/12` radians and `-pi/12` radians respectively. Finally, hitting `r` should temporarily disable new keyboard input for 10 seconds during which the viewpoint rotates once around the scene in a clockwise direction along the "circle" defined by the cylinder. During this rotation the viewpoint should always be looking at the origin.

Point Breakdown

Blender Model of Halloween You1pt
Department C++ Style Guides followed1pt
Screen drawn in initial state as described.1pt
Monster moves in path described, legs animates as described.1pt
Keys '1' through '9' work as described.1pt
Implementation of rigtform.h, use of this and quat.h.1pt
Quaternionic powering is default interpolation method. Keys 's','p','l' work as described.1pt
Outward and inward motion via - and = works as described.1pt
Rotating the cylinder via the keys ',' and '.' works as described.1pt
Viewpoint rotation and animation on 'r' key press as described.1pt
Total10pts